require 'talkshoe/connection'
require 'talkshoe/episode'
require 'talkshoe/episode_list'
require 'talkshoe/talk_cast'

module TalkShoe
  
  class <<TalkShoe
  
    def live_shows
      doc = Connection.new(:service_name => 'TalkcastService', :method_name => 'getLiveShows').xml
      EpisodeList.new(doc)
    end
  
    def upcoming_shows(count = 100)
      doc = Connection.new(:service_name => 'TalkcastService', :method_name => 'getUpcomingShows', :count => count).xml
      EpisodeList.new(doc)
    end
  
    def talkcast_information(talkcast_id)
      doc = Connection.new(:service_name => 'TalkcastService', :method_name => 'getTalkcastInformation', :talkcastId => talkcast_id).xml
      TalkCast.new(doc)
    end

    def episodes(talkcast_id)
      doc = Connection.new(:service_name => 'TalkcastService', :method_name => 'getEpisodes', :talkcastId => talkcast_id).xml
      EpisodeList.new(doc)
    end
  end
  
end